using System;
using CodeAngel.Domain.Framework;

namespace CodeAngel.Domain
{
    public partial class FilterRelation
	{
		#region SetDefaultPropertyValues

        /// <summary>
        /// Sets the properties of a new entity to its default values.
        /// </summary>
		internal override void SetDefaultPropertyValues()
		{
            this.SetFriendlyIdAsync();
            this.FilterRelationID = Guid.NewGuid();
            
            if (this.ParentEntity is EntityDef)
                this.EntityDef = this.ParentEntity as EntityDef;
            else if (this.ParentEntity is FilterRelation)
                this.ParentFilterRelation = this.ParentEntity as FilterRelation;
            else if (this.ParentEntity is PropertyDef)
                this.PropertyDef = this.ParentEntity as PropertyDef;
		}

		#endregion
    }
}

